<template>
  <div>
    <div class="row">
      <div class="col-xs-offset-2 col-xs-8">
        <div class="page-header">
          <h2>Vue Router Demo</h2>
          <button @click="back">后退</button>
          <button @click="forward">前进</button>
          <button @click="go">测试go</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Banner",
  methods:{
    back(){
      this.$router.back()
    },
    forward(){
      this.$router.forward()
    },
    go(){
      this.$router.go(3) //里面传入一个数字,如果是正整数,判断是第几个路由并跳转到该路由
    }
  }
}
</script>

<style scoped>

</style>